package com.qupeng.demo.kafka.kafkaspringbootconsumer.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.kafka.core.ProducerFactory;

@Configuration
public class TemplateConfig<K, V> {
    @Bean
    public KafkaTemplate<K, V> kafkaTemplate(ProducerFactory<K, V>  producerFactory) throws ClassNotFoundException {
        return new KafkaTemplate<>(producerFactory);
    }
}
